package pro.shushi.pamirs.hr.api.model.major;

import pro.shushi.pamirs.boot.base.ux.annotation.field.UxWidget;
import pro.shushi.pamirs.boot.base.ux.annotation.view.UxTable;
import pro.shushi.pamirs.meta.annotation.Field;
import pro.shushi.pamirs.meta.annotation.Model;
import pro.shushi.pamirs.meta.base.common.CodeModel;

import java.util.List;

/**
 * DictionaryType 数据字典类型
 * @author shushi
 */
@Model.model(DictionaryType.MODEL_MODEL)
@Model(displayName = "数据字典类型", labelFields = "typeName")
@Model.Code(sequence = "SEQ", prefix = "PT", size = 4)
public class DictionaryType extends CodeModel {

    private static final long serialVersionUID = -1L;

    public static final String MODEL_MODEL = "hr.simple.DictionaryType";

    @Field(displayName = "编码", priority = 90L, required = true)
    private String code;

    @Field(displayName = "类型名称", summary = "类型名称", required = true)
    private String typeName;

    @Field.Text
    @Field(displayName = "备注", summary = "备注")
    private String remark;

    @Field.one2many
    @Field.Relation(relationFields = {"code"}, referenceFields = {"typeCode"})
    @Field(displayName = "字典列表")
    @UxTable.FieldWidget(@UxWidget(invisible = "true"))
    private List<DictionaryItem> items;

}
